-- gui.lua

-- Functions available: (brackets indicate optional arguments)
-- RG_GUI.drawHealthBar(x, y, [width, height])
-- RG_GUI.drawTextBox(x, y, width, height, string, [fontColor, boxColor, trimColor])
-- RG_GUI.drawBigTextBox(x, y, width, height, string, [fontColor, boxColor, trimColor])
-- RG_GUI.loadImage(filename)
-- RG_GUI.drawImage(x, y, image)
-- RG_GUI.getPlayerHP()
--
-- Colors are passed as tables of floats between 0-1 representing intensity of
-- red, green, blue, and alpha, respectively. Alpha values are optional.

profile = RG_GUI.loadImage("img/profile.png");

display = function()
    local player = RG_npc.info(-1)
    RG_GUI.drawHealthBar(player.hp, player.hp_max, -5, -30, 44)
    RG_GUI.drawTextBox(5, -5, 122, 21, "The Great Outdoors", {0,0,0}, {1,1,0,0.7}, {0,0,0})
    RG_GUI.drawTextBox(-5, -5, 44, 21, "Status", {0.8,0.8,0}, {0.3,0.3,0.3,0.8}, {0,0,0})
    RG_GUI.drawImage(0, 0, profile)
    --if RG_GUI.getPlayerHP() <= 0 then
        --RG_GUI.drawBigTextBox(150, -150, 151, 35, "You have died")
    --end
    if player.hp <= 0 then
        RG_GUI.drawBigTextBox(150, -150, 151, 35, "You have died")
    end
end
